(function () {

	var $modal = $('#pop-modal');

	getPageData({});
	 
	function getPageData (Filter)
	 {
	 	var Filter = Filter;
	 		Filter.page = page.page;
	 		Filter.pageSize = page.pageSize;
	 	getJson(Domain+'/mbr/usedAuctionRecord/doUsedAuctionRecordList.do', Filter, function (res) {
		  if(!res.success){
	
		    $('.am-modal-bd').text(res.errorMessage);
				
				$modal.modal();
				
				setTimeout(function () {
					$modal.modal('close');
				},iWiating);
				return;
		  }
		  else{

			 renderTmp('#itemlist', 'itemlisttpl',res);
			 lazyLoad.refresh(true);
			 	
		  }
		})
	 }

	 //搜索
	 $().on('click',function () {

	 	var sKeywords = $('input[name="keywords"]').val();
	 		
	 		if(sKeywords)
	 		{
	 			getPageData({
	 				keywords:sKeywords
	 			});
	 		}
	 		else
	 		{
	 			getPageData({});
	 		}

	 });


})();